<?php include '../../authorization_check.php' ?>
<?php include '../../checkSecretaryOnly.php' ?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
<title>Select Section</title>
<SCRIPT TYPE="text/javascript" src= "../../commonutils/util/util.js"> </SCRIPT>
</head>
<style type="text/css">
  th {text-align: right}  
</style>
<body>

<?php include 'top.html' ?>

<?php include 'notifier.php' ?>


  
<FORM NAME ="form1" METHOD ="POST" ACTION = "EditSection.php">
<table border=1>
<tr>
<th></th>
<th style="text-align:center">COURSE CODE </th>
<th style="text-align:center">COURSE NAME </th>
<th style="text-align:center">SECTION </th>
<th style="text-align:center">INSTRUCTOR </th>
</tr>

<p>
<?php
require_once '../../commonutils/db/DBConnectionManager.php';

	$sqlquery = " select s.sectionID, c.courseCode, c.courseName, s.sectionNumber, i.firstname, i.lastname ".
				" from course c, section s, instructor i ".
				" where s.courseCode = c.courseCode and s.instructorID = i.instructorID ".
				" and s.semesterID = ".$semesterID." and c.programCode = ".$programCode.
				" order by courseCode ";
	
	/* echo $sqlquery;  */


	
	$result = DBConnectionManager::query($sqlquery);
	while($row = mysql_fetch_assoc($result)){
		echo "<tr>";
		echo "<td><input type=\"radio\" name=\"group1\" value= \"".$row['sectionID']."\"></td>";
		echo "<td>".$row['courseCode']."</td>";
		echo "<td>".$row['courseName']."</td>";
		echo "<td>".$row['sectionNumber']."</td>";
		echo "<td>".$row['firstname']." ".$row['lastname']."</td>";
		echo "</tr>";		
	}
	echo "</table>";
	
?>

</p>

<input type="submit" value="Edit selected section" name="btnSelect" onClick="return radioControl(group1)">
<input type="reset" value="Reset" name="btnReset"></p>  
</p>  


</FORM>

<?php include 'bottom.php' ?>

</body>


</html>